﻿using System;
using Abp.Domain.Entities.Auditing;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FwProject.Core.TypeNumber
{
    /// <summary>
    /// 型号配置
    /// </summary>
    [Table("TypeNumberInfo")]
    public class TypeNumberInfo: FullAuditedEntity<Guid>
    {
        public const int StringLength = 200;
        [Required]
        public ModuleFlag ModuleFlag { get; set; } = ModuleFlag.产品模块;
        [Required]
        public AttributeFlag   AttributeFlag{ get; set; } = AttributeFlag.餐厅;
        /// <summary>
        /// 型号名称
        /// </summary>
        /// <value>The name.</value>
        [Required]
        [StringLength(StringLength)]
        public string  Name{ get; set; }
        /// <summary>
        /// 型号描述
        /// </summary>
        /// <value>The readme.</value>
        [StringLength(StringLength)]
        public string   Readme{ get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        /// <value>The order list.</value>
        [Required]
        public int OrderList { get; set; } = 1;
        /// <summary>
        /// 单位
        /// </summary>
        /// <value>The unit.</value>
        [Required]
        public  UnitFlag  Unit{ get; set; } = UnitFlag.套;

        /// <summary>
        /// 数量
        /// </summary>
        public int Count { get; set; }
        /// <summary>
        /// 工厂
        /// </summary>
        public Guid? FactoryinfoId { get; set; }
        /// <summary>
        /// 默认装车型号
        /// </summary>
        public bool IsActive { get; set; } = true;
    }
    public enum ModuleFlag{

        产品模块=0
    }
    public enum AttributeFlag
    {
        餐厅=0

    }
    public enum UnitFlag
    {
        [Display(Name ="个")]
        个 = 0,
        [Display(Name = "箱")]
        箱 =1,
        [Display(Name = "件")]
        件 =2,
        [Display(Name = "套")]
        套 =3
    }


}
